Skip to content

Conversation

@hwei0
Copy link
Member

@hwei0 hwei0 commented Dec 17, 2025

Issue #, if available:
#82

Description of changes:

added custom --version output to publish boto3, botocore git tag+commit+data hash (data hash is the hash of the simplified data files). This information will only be exposed if the hidden --debug flag is set; current --version behaviour without the --deubg flag will remain unchanged.

example output

./target/debug/iam-policy-autopilot --version --debug
0.1.2
boto3 version: commit_id=0ca53211df7d2bb2213436a6b19e8cf0b44dee7d, commit_tag=1.42.11, data_hash=8309474F524E2F3DE2F90ADA66F1C5C887358CC503846073663BA311783FF495
botocore version: commit_id=7c770fb210913ff9fa9b35470161c3278786085b, commit_tag=None, data_hash=615E77E2C8C1DD6FD471416D712F4FE5A8E66B45150DC5D4BDC192736A8A42F1

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Cargo.toml Outdated
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1.8", features = ["v4"] }
sha2 = "0.10"
sha2 = "0.10.9"
Copy link
Contributor

@mschlaipfer mschlaipfer Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is causing the OpenSSL build issue. We use rustls-tls in the reqwest dependency to work around a similar issue. I wonder if using use https://docs.rs/aws-lc-rs/1.15.2/aws_lc_rs/digest/fn.digest.html here would resolve the error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like aws-lc-rs also failed the build for the same reason 💀

i resolved the build failure by adding the following to Cargo.toml depencies:

openssl = { version = "0.10", features = ["vendored"] }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By how much does that increase the binary size?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there's a better solution, but if the size increase is significant, we should look into it more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh lol the binary just stays the same size:

[current release]
hbwei@6c7e67c57386 iam-policy-autopilot-awslabs % du -sh ./target/release/iam-policy-autopilot
 53M    ./target/release/iam-policy-autopilot

[this PR changes]
hbwei@6c7e67c57386 iam-policy-autopilot % du -sh target/release/iam-policy-autopilot
 52M    target/release/iam-policy-autopilot

maybe it's because I just added openssl to the workspace dependencies, which don't get packaged into the binary

@mschlaipfer
Copy link
Contributor

The PR title will need a chore: or feat: so it gets merged correctly (I don't think we have the PR title check, which should block merging this, yet).

@hwei0 hwei0 changed the title add submodule version+data hash info to --version output add submodule version+data hash info to --version --debug output Jan 5, 2026
weibenz1
weibenz1 previously approved these changes Jan 6, 2026
@weibenz1
Copy link
Contributor

weibenz1 commented Jan 6, 2026

The PR title will need a chore: or feat: so it gets merged correctly (I don't think we have the PR title check, which should block merging this, yet).

don't forget about this

@hwei0 hwei0 changed the title add submodule version+data hash info to --version --debug output feat: add submodule version+data hash info to --version --debug output Jan 6, 2026
@hwei0 hwei0 dismissed mschlaipfer’s stale review January 7, 2026 18:57

feedback has been addressed, thanks!

Copy link
Contributor

@mschlaipfer mschlaipfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hwei0 hwei0 merged commit 3af3cb3 into awslabs:main Jan 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants